<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\admin\Rbac\UserController;
use App\Http\Controllers\admin\Rbac\NodeController;
use App\Http\Controllers\admin\Rbac\RoleController;
use App\Http\Controllers\admin\article\ArticleController;
use App\Http\Controllers\admin\courtyard\CourtyardareaController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/



//刘璇后台管理管理员
Route::prefix('user')->group(function (){
    //后台管理员页面
    Route::get('user_index',[UserController::class,'roleIndex']);
    //后台添加管理员页面
    Route::get('user_create',[UserController::class,'userCreate']);
    //后台添加管理员
    Route::post('user_add',[UserController::class,'userAdd']);
    //后台修改管理员页面
    Route::get('user_update/{id}',[UserController::class,'userUpdate']);
    //后台修改管理员
    Route::post('user_edit',[UserController::class,'userEdit']);
    //后台删除管理员
    Route::get('user_delete/{id}',[UserController::class,'userDelete']);
    //后台角色权限展示列表
    Route::get('role_index',[RoleController::class,'roleIndex']);
    //后台添加角色分配权限页面
    Route::get('role_create',[RoleController::class,'roleCreate']);
    //后台修改角色页面
    Route::get('user_update/{id}',[UserController::class,'userUpdate']);
    //后台修改角色
    Route::post('user_edit',[UserController::class,'userEdit']);
    //后台删除角色
    Route::get('role_delete/{id}',[RoleController::class,'roleDelete']);
    //后台添加角色分配权限
    Route::post('role_add',[RoleController::class,'roleAdd']);
    //后台展示权限页面
    Route::get('node_index',[NodeController::class,'nodeIndex']);
    //后台删除权限
    Route::get('node_delete/{id}',[NodeController::class,'nodeDelete']);
});
//刘璇后台医院管理
Route::prefix('hospital')->group(function (){
    //后台健康百科展示列表
    Route::get('health_article',[ArticleController::class,'healthArticle']);
    //后台健康百科文章添加页面
    Route::get('health_create',[ArticleController::class,'articleCreate']);
    //后台健康百科文章添加
    Route::post('health_add',[ArticleController::class,'articleAdd']);
    //后台健康百科文章删除
    Route::get('health_delete',[ArticleController::class,'articleDelete']);
    //后台院区管理列表
    Route::get('courtyard_area',[CourtyardareaController::class,'courtyardArea']);
    //后台院区添加页面
    Route::get('courtyard_add',[CourtyardareaController::class,'courtyardAdd']);
    //后台院区添加
    Route::post('courtyard_insert',[CourtyardareaController::class,'courtyardInsert']);
    //后台院区修改页面
    Route::get('courtyard_update',[CourtyardareaController::class,'courtyardUpdate']);
    //后台院区修改
    Route::post('courtyard_edit',[CourtyardareaController::class,'courtyardEdit']);
    //后台院区删除
    Route::get('courtyard_delete',[CourtyardareaController::class,'courtyardDelete']);
});

Route::get('/export', [\App\Http\Controllers\admin\courtyard\ExportController::class, 'export'])->name('export');






